#include "vtkscene.h"

namespace vtkMethods
{

	// Constructor
	DECLDIR vtkScene::vtkScene()
	{
		// Initialize vtkRenderer
		renderer = vtkSmartPointer<vtkRenderer>::New();

		// Initialize background color
		//renderer->SetBackground(0.878, 0.875, 0.890); // Background Color Grey
		renderer->SetBackground(0, 0, 0); // Background Color Black
	}

	// Destructor
	DECLDIR vtkScene::~vtkScene()
	{

	}

	// Update
	DECLDIR void vtkScene::update()
	{
		
	}

	// AddActor
	DECLDIR void vtkScene::addSTLActor(const char * actorname, std::string fileName)
	{

		// Import stl geometry into vtk
		vtkSmartPointer<vtkActor> actor = vtkMethods::vtkloadstl(fileName);

		// Add actor to ActorList
		ActorList[actorname] = actor;

		// Add actor to scene
		renderer->AddActor(actor);
	}

	// GetActor
	DECLDIR void vtkScene::getActor(void)
	{

	}

	// Remove Actor
	DECLDIR void vtkScene::removeActor(const char * actorname)
	{
		ActorList.erase(actorname);
	}

	// Remove All Actors
	DECLDIR void vtkScene::removeActors(void)
	{
		ActorList.clear();
	}
}